#ifndef GLPARSE_H
#define GLPARSE_H

#include <QObject>

#include "GLProtocol/gl_protocol.h"
#include "serial.h"
#include "workspace.h"

class GLParse : public QObject
{
    Q_OBJECT
private:

    FRAME_STRUCT frame_s_tmp;

public:

    GLParse();
    void receive_uart_data(char *receive_buffer, uint16_t receive_len);
    void send_test();
    void init(Serial *sserial);
    void getFrame();
    void printf_frame(FRAME_STRUCT *frame_s);
    void send_flash_begin(unsigned int size);
    void send_flash_trans(unsigned char *buffer,unsigned int len);
    void send_flash_crc(int crc);
    void send_system_get_version(void);
signals:
    void getFrameSignals(PARSE_STRUCT parse_s);
private slots:
    void getFrameSlot(PARSE_STRUCT parse_s);
};

#endif // GLPARSE_H
